import request from '@/utils/request'

// 查询采购分配触发SKC列表
export function AllocationLogPreview(query) {
  return request({
    url: '/productAllocation/AllocationLogPreview/list',
    method: 'get',
    params: query
  })
}
// 查询采购分配触发SKC列表
export function selectSkcList(query) {
  return request({
    url: '/product/BiSkuSkcSpuItem/selectSkcList',
    method: 'get',
    params: query
  })
}
export function listTriggerSkc(query) {
  return request({
    url: '/productAllocation/triggerSkc/list',
    method: 'get',
    params: query
  })
}
// 查询采购分配触发SKC详细
export function getTriggerSkc(id) {
  return request({
    url: '/productAllocation/triggerSkc/' + id,
    method: 'get'
  })
}

// 新增采购分配触发SKC
export function addTriggerSkc(data) {
  return request({
    url: '/productAllocation/triggerSkc',
    method: 'post',
    data: data
  })
}
// 新增采购分配触发SKC
export function byids(data) {
  return request({
    url: '/productAllocation/trigger/triggerSkc/byids',
    method: 'post',
    data: data
  })
}
// 新增采购分配触发SKC
export function triggerSpubyids(data) {
  return request({
    url: '/productAllocation/trigger/triggerSpu/byids',
    method: 'post',
    data: data
  })
}
// 新增采购分配触发SKC
export function triggerItembyids(data) {
  return request({
    url: '/productAllocation/trigger/triggerItem/byids',
    method: 'post',
    data: data
  })
}

// 新增采购分配触发SKC
export function previewAllocationForSkc(data) {
  return request({
    url: '/productAllocation/trigger/trigger/previewAllocationForSkc',
    method: 'post',
    data: data
  })
}
// 修改采购分配触发SKC
export function updateTriggerSkc(data) {
  return request({
    url: '/productAllocation/triggerSkc',
    method: 'put',
    data: data
  })
}

// 删除采购分配触发SKC
export function delTriggerSkc(id) {
  return request({
    url: '/productAllocation/triggerSkc/' + id,
    method: 'delete'
  })
}
